import json

# user = {
#     "name":"苑昊",
#     "email":"123@qq.com",
#     "gender":"male",
# }
#
# print(repr(json.dumps(user, ensure_ascii=False)))
# print(json.dump(user))
# data = {
#     1000:"apple",
#     2000:"banana",
#     3000:"peach"
# }
# print(repr(json.dumps(data)))
# with open('data.json', 'w', encoding='utf-8') as f:
#     json.dump(data, f)
# with open("data.json") as f:
#     data = json.load(f)
#     print(data)
#
# print({int(k):v for k,v in data.items()})

user = {
    "name":"苑昊",
    "email":"123@qq.com",
    "gender":"male",
}
print(repr(json.dumps(user, ensure_ascii=False)))